package com.joshondesign.sdljava.gfx;

public abstract class Animation {
    protected boolean dead;
    protected boolean running;
    private long startTime;

    public Animation() {
        dead = false;
        running = false;
    }

    public boolean isDead() {
        return dead;
    }

    public boolean isRunning() {
        return running;
    }

    public void stop() {
        this.running = false;
        this.dead = true;
    }

    public void start(long currentTime) {
        this.running = true;
        this.startTime = currentTime;
    }

    public long getStartTime() {
        return startTime;
    }

    public abstract void update(long currentTime) throws Exception;
}
